﻿@model ProductDetailsModel

@{
    ViewBag.Title = "Product Details";
}

<div>
    <h2>Details for @Model.ProductName</h2>
    Currency: <b>@Model.CurrentCurrency</b><br />
    Average price: @Product.RenderPrice(Model.AveragePrice)
</div>

<div class="detail-offers">
    <h3>Best offers</h3>
    @foreach (var ts in Model.Offers){
        <div class="trade-slot">
            @Product.RenderPrice(ts.Price()) [@ts.OfferQuantity] <--> [@ts.DemandQuantity] (@ts.LotsCount) @ts.SenderName
        </div>
    }
</div>
<div class="detail-demand">
    <h3>Demand</h3>
    @foreach (var ts in Model.Demand){
        <div class="trade-slot">
            @Product.RenderPrice(ts.Price()) [@ts.OfferQuantity] <--> [@ts.DemandQuantity] (@ts.LotsCount) @ts.SenderName
        </div>
    }
</div>

<div class="price-history">
    Average prices
    <div>
        <img src="@Url.Action(MVC.Trade.PriceHistoryImg(@Model.ProductName))" />
    </div>
</div>
